package com.qingsong.dto;

import com.qingsong.constant.RE;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import org.hibernate.validator.constraints.Range;

import javax.validation.constraints.NotNull;
import javax.validation.constraints.Pattern;
import java.io.Serializable;

@Schema(name = "季次修改DTO")
@Data
public class SeasonUpdateDTO implements Serializable, RE {

    @NotNull(message = "主键不能为空")
    @Schema(description = "主键")
    private Long id;

    @Pattern(regexp = TITLE_RE, message = TITLE_RE_MSG)
    @Schema(description = "标题")
    private String title;

    @Pattern(regexp = INFO_RE, message = INFO_RE_MSG)
    @Schema(description = "描述")
    private String info;

    @Range(min = 0, message = "序号最小为0")
    @Schema(description = "序号")
    private Long idx;

    @Schema(description = "课程表ID,课程表外键")
    private Long fkCourseId;
}